package com.imooc.product.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ServerController {


//    @Autowired
//    private LoadBalancerClient loadBalancerClient ;


    @RequestMapping("msg")
    public String msg(){
//
//        ServiceInstance serviceInstance = loadBalancerClient.choose("ORDER");
//
//        String host = serviceInstance.getHost();
//
//        System.out.print(host);

        return "this is product msg 2 ";

    }

}
